<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Refundrules.js此处编写
 -->
<template>
  <div>
    <view-grid
      ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormFileds="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
    >
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/Refundrules.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "退改规则",
        name: "Refundrules",
        url: "/Refundrules/",
        sortName: "createDate",
      },
      extend: extend,
      editFormFields: {
        refundName: "",
        isAddTicket: "",
        isRefund: "",
        isServiceCharge:"",
        basic: "",
        isSplitRefund: "",
        beforeDate: "",
        afterDate: "",
        creator: "",
        createDate: "",
        modifier: "",
        modifyDate: "",
        modifyID: "",
        createID: "",
        merchantCode: "",
        merchantName: "",
      },
      editFormOptions: [
        
      ],
      searchFormFields: {
        refundName: "",
        isAddTicket: "",
        isRefund: "",
        basic: "",
        beforeDate: "",
        afterDate: "",
        isServiceCharge:""
      },
      searchFormOptions: [
        [
          { title: "退改名称", field: "refundName", type: "like" },
          {
            dataKey: "enable",
            data: [],
            title: "是否加票",
            field: "isAddTicket",
            type: "select",
          },
          {
            dataKey: "enable",
            data: [],
            title: "是否可退",
            field: "isRefund",
            type: "select",
          },
        ],
        [
          {
            dataKey: "basic",
            data: [],
            title: "基础条件",
            field: "basic",
            type: "select",
          },
          { title: "有效期前几天", field: "beforeDate", type: "number" },
          { title: "有效期后几天", field: "afterDate", type: "number" },
        ],
      ],
      columns: [
        {
          field: "id",
          title: "主键",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "refundName",
          title: "退改名称",
          type: "string",
          width: 120,
          require: true,
          align: "left",
          sortable: true,
        },
        {
          field: "isAddTicket",
          title: "是否加票",
          type: "int",
          bind: { key: "enable", data: [] },
          width: 80,
          align: "left",
        },
        {
          field: "isRefund",
          title: "是否可退",
          type: "int",
          bind: { key: "enable", data: [] },
          width: 80,
          align: "left",
        },
        {
          field: "isServiceCharge",
          title: "是否收取手续费",
          type: "int",
          bind: { key: "enable", data: [] },
          width: 80,
          align: "left",
        },

        {
          field: "basic",
          title: "基础条件",
          type: "string",
          bind: { key: "basic", data: [] },
          width: 80,
          align: "left",
        },
        {
          field: "beforeDate",
          title: "有效期前几天",
          type: "int",
          width: 100,
          readonly: true,
          align: "left",
        },
        {
          field: "afterDate",
          title: "有效期后几天",
          type: "int",
          width: 100,
          readonly: true,
          align: "left",
        },
        {
          field: "isSplitRefund",
          title: "支持分笔退款开关",
          type: "int",
          bind: { key: "enable", data: [] },
          width: 130,
          align: "left",
        },
        {
          field: "creator",
          title: "创建人",
          type: "string",
          width: 100,
          readonly: true,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          readonly: true,
          align: "left",
          sortable: true,
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 100,
          readonly: true,
          align: "left",
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 160,
          readonly: true,
          align: "left",
          sortable: true,
        },
        {
          field: "reviewTime",
          title: "审核时间",
          type: "datetime",
          width: 90,
          hidden: true,
          align: "left",
          sortable: true,
        },
        {
          field: "refundRules",
          title: "退款规则",
          type: "string",
          width: 220,
          hidden: true,
          align: "left",
        },
        {
          field: "refundAtLatest",
          title: "最晚退款提前?天",
          type: "int",
          width: 90,
          hidden: true,
          align: "left",
        },
        {
          field: "refundCalendar",
          title: "退款日历",
          type: "datetime",
          width: 90,
          hidden: true,
          align: "left",
          sortable: true,
        },
        {
          field: "modifyID",
          title: "修改人ID",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          align: "left",
        },
        {
          field: "createID",
          title: "创建人ID",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          align: "left",
        },
        {
          field: "autoEnd",
          title: "X天后自动完结",
          type: "int",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "isAutoEnd",
          title: "是否自动完结",
          type: "sbyte",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "isAvailable",
          title: "是否可用",
          type: "sbyte",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "isDelete",
          title: "是否删除",
          type: "int",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "isExpirationRefundable",
          title: "过期是否可退",
          type: "sbyte",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "isRefundable",
          title: "是否可退",
          type: "sbyte",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "isRefundReview",
          title: "退款是否审核",
          type: "sbyte",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "refundCode",
          title: "退改模板编码",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "remark",
          title: "备注",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
        {
          field: "rules",
          title: "退改规则",
          type: "string",
          width: 120,
          hidden: true,
          align: "left",
        },
      ],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
